import { createRouter, createWebHistory } from 'vue-router'
import layout from "../views/layout/layout.vue";
export const routes = [
    {
        path: '/login',
        name: 'login',
        component: ()=> import('@/views/Login.vue')
    },
    {
        path:'',
        component:layout,
        redirect:'/home',
        name:'home',
        children:[
            {
                path:'home',
                name:'home',
                component:()=>import('@/views/Home.vue'),
                meta:{title:'首页',icon:'home'}
            }
        ]
    }
]

const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router
